
public class TimeTicker
{
    /**
     * @param time: 完成时间
     */
    public TimeTicker(float time)
    {
        finalTime = time;
    }
    private float finalTime = 0;
    private float time = 0;
    public void Tick(float dt)
    {
        if (time < finalTime)
        {
            time += dt;
        }
    }
    public bool IsTimeUp()
    {
        if (time >= finalTime)
        {
            time = 0;
            return true;
        }
        return false;
    }
}
